/**
 * Created by v on 17-3-14.
 */
var elementList="";
var number=0;

function getElement(node) {
    for(var child=node.firstChild;child!=null;child=child.nextSibling){
        elementList+=node.name+",";
        number++;
        getElement(node);
    }
}

function show() {
    var number=getElement(document);
    elementList=elementList.substring(0,elementList.length-1);
    alert("该文档包含："+elementList+"共"+number+"个标记");
    elementList="";
}

function test() {
    alert("进入到了")
}
